package cn.ailearn.utils.web;

import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

/**
 * @ClassName WebUtils
 * @Description 返回结果工具类
 * @Author WDEMO
 * @Date 2025/8/19 18:29
 */
public class WebUtils {

    public static void writeResponse(HttpServletResponse response, String result) throws IOException {
        response.setContentType("application/json;charset=utf-8");
        response.setStatus(200);
        response.setCharacterEncoding("utf-8");//设置响应编码
        response.getWriter().write(result);
    }
}
